home *** CD-ROM | disk | FTP | other *** search
- Path: lamarck.sura.net!wvnvms!un025043
- From: un025043@wvnvms.wvnet.edu
- Newsgroups: comp.lang.c
- Subject: Arrows in Turbo C++ ...PLS HELP
- Message-ID: <1996Jan11.220047.16628@wvnvms>
- Date: 11 Jan 96 22:00:47 EST
- Organization: West Virginia Network for Educational Telecomputing
- Followup-To: comp.lang.c,comp.lang.c++
-
- Hi,
- I'm creating an Animated Graph Routine using Turbo C++ graphics.
- I have been able to show nodes as circles(colored) and links as
- lines, using the line() function.That suffices for undirected graphs.
-
- In the case of directed graphs, I need to draw not plain lines but
- ARROWS. Unfortunately, Turbo C++ , or at least the graphics.h file
- does not have a pre-defined arrow() function.
-
- Can any of you write an arrow() function that takes in four parameters,
- arrow(from_x,from_y,to_x,to_y) & draws an arrow directed from the
- point (from_x,from_y) to the point (to_x,to_y) ?
-
- I've thought long & hard but the problem seems too difficult.You see,
- it is easy to write the function if one makes such major assunptions
- as a. Horizontal line, b.Vertical line.
- But for a line in ANY given direction, denoted by the set of 4 pixels
- as above, it becomes too difficult. Pls try your hand at this problem.
- I don't mind if you can't get an EXACT Arrow, any Arrow-like figure
- is acceptable.
-
- Pls email me at krishna@h.cs.wvu.edu
-
- Thank you.
- Krish.
-
-